'use strict';
const BaseController = require('../base');
class RouterController extends BaseController {
  static get serviceName() {
    return 'business.purchaser';
  }

  // 供应商小程序登录
  async login() {
    const { ctx } = this;
    const result = await this.service.login(ctx.request.body);
    if (result) {
      ctx.success(result);
    } else {
      ctx.error(500, '登录失败，请检查用户名密码');
    }
  }
}
module.exports = RouterController; 